package com.shop.util;

import java.util.List;

/**
 * @Description TODO
 * @Author ls
 * @Date 2022/3/12 14:20
 **/
public class PageUtil<T> {
	private List<T> list;
	private int showNum = 12;
	private int beginIndex = 0;
	//当前页
	private int currentPage = 1; //默认第一页


	public List<T> getList() {
		return list;
	}
	public void setList(List<T> list) {
		this.list = list;
	}
	public int getShowNum() {
		return showNum;
	}
	public void setShowNum(int showNum) {
		this.showNum = showNum;
	}

	public int getBeginIndex() {
		beginIndex = (currentPage-1)*showNum;
		return beginIndex;
	}

	public int getCurrentPage() {
		return currentPage;
	}
	public void setCurrentPage(int currentPage) {
		this.currentPage = currentPage;
	}
}
